@font-face {
  font-family: AlibabaPuHuiTi;
  src:
    url('./font/AlibabaPuHuiTi-3-55-Regular.woff') format('woff'),
    url('./font/AlibabaPuHuiTi-3-55-Regular.ttf') format('truetype'),
    url('./font/AlibabaPuHuiTi-3-55-Regular.eot') format('eot'),
    url('./font/AlibabaPuHuiTi-3-55-Regular.otf') format('opentype'),
    url('./font/AlibabaPuHuiTi-3-55-Regular.woff2') format('woff2');
}
* {
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  box-sizing: border-box;
}

body {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  font-family: 'PingFang SC', AlibabaPuHuiTi !important;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--app-text-color);
}

#app {
  height: 100%;
}

:focus {
  outline: none;
}

a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

div:focus {
  outline: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 滚动条整体部分 */
::-webkit-scrollbar {
  width: 6px; // 纵向滚动条宽度
  height: 6px; // 横向滚动条高度
}

/* 滑块 */
::-webkit-scrollbar-thumb {
  border-radius: 5px;
}

/* 轨道 */
::-webkit-scrollbar-track {
  border-radius: 5px;
  background-color: transparent;
}

.clearfix:after {
  content: '';
  display: block;
  clear: both;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 20px;
  font-weight: 500;
}

h3 {
  font-size: 18px;
}

h4 {
  font-size: 16px;
}

h5 {
  font-size: 14px;
  font-weight: 500;
}

.bold {
  font-weight: 600;
}
.lighter {
  font-weight: 400;
}

.w-full {
  width: 100%;
}
.h-full {
  height: 100%;
}
.w-120 {
  width: 120px;
}
.w-240 {
  width: 240px;
}
.w-280 {
  width: 280px;
}
.w-500 {
  width: 500px;
}
.max-w-200 {
  max-width: 200px;
}
.max-w-350 {
  max-width: 350px;
}

.mt-4 {
  margin-top: calc(var(--app-base-px) - 4px);
}

.mt-8 {
  margin-top: var(--app-base-px);
}
.mt-12 {
  margin-top: calc(var(--app-base-px) + 4px);
}
.mt-16 {
  margin-top: calc(var(--app-base-px) * 2);
}
.mt-20 {
  margin-top: calc(var(--app-base-px) * 2 + 4px);
}
.mt-24 {
  margin-top: calc(var(--app-base-px) * 3);
}

.mb-4 {
  margin-bottom: calc(var(--app-base-px) - 4px);
}
.mb-8 {
  margin-bottom: var(--app-base-px);
}
.mb-12 {
  margin-bottom: calc(var(--app-base-px) + 4px);
}
.mb-16 {
  margin-bottom: calc(var(--app-base-px) * 2);
}
.mb-24 {
  margin-bottom: calc(var(--app-base-px) * 3);
}
.ml-4 {
  margin-left: calc(var(--app-base-px) - 4px);
}
.ml-8 {
  margin-left: var(--app-base-px);
}
.ml-12 {
  margin-left: calc(var(--app-base-px) + 4px);
}
.ml-16 {
  margin-left: calc(var(--app-base-px) * 2);
}
.ml-24 {
  margin-left: calc(var(--app-base-px) * 3);
}
.mr-4 {
  margin-right: calc(var(--app-base-px) - 4px);
}
.mr-8 {
  margin-right: var(--app-base-px);
}
.mr-12 {
  margin-right: calc(var(--app-base-px) + 4px);
}
.mr-16 {
  margin-right: calc(var(--app-base-px) * 2);
}
.mr-24 {
  margin-right: calc(var(--app-base-px) * 3);
}
.p-8 {
  padding: var(--app-base-px);
}
.p-16 {
  padding: calc(var(--app-base-px) * 2);
}
.p-24 {
  padding: calc(var(--app-base-px) * 3);
}
.p-8-12 {
  padding: calc(var(--app-base-px)) calc(var(--app-base-px) + 4px);
}
.p-12-16 {
  padding: calc(var(--app-base-px) + 4px) calc(var(--app-base-px) * 2);
}
.p-12-24 {
  padding: calc(var(--app-base-px) + 4px) calc(var(--app-base-px) * 3);
}
.p-16-24 {
  padding: calc(var(--app-base-px) * 2) calc(var(--app-base-px) * 3);
}

.pt-0 {
  padding-top: 0;
}
.pb-0 {
  padding-bottom: 0;
}

.float-right {
  float: right;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-wrap {
  display: flex;
  flex-wrap: wrap;
  align-content: space-between;
}

.align-center {
  align-items: center;
}

.align-baseline {
  align-items: baseline;
}

.justify-center {
  justify-content: center;
}

.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}

.vertical-middle {
  vertical-align: middle;
}

.line-height-22 {
  line-height: 22px;
}

.border {
  border: 1px solid var(--el-border-color);
}

.border-l {
  border-left: 1px solid var(--el-border-color);
}

.border-b {
  border-bottom: 1px solid var(--el-border-color);
}
.border-r {
  border-right: 1px solid var(--el-border-color);
}
.border-t {
  border-top: 1px solid var(--el-border-color);
}

.border-b-light {
  border-bottom: 1px solid var(--el-border-color-lighter);
}
.border-r-4 {
  border-radius: 4px;
}
.border-r-8 {
  border-radius: 8px;
}

.border-t-dashed {
  border-top: 1px dashed var(--el-border-color);
}
.border-primary {
  border: 1px solid var(--el-color-primary);
  color: var(--el-color-primary);
}

.border-none {
  border: none;
}

.cursor {
  cursor: pointer;
}
.notAllowed {
  cursor: not-allowed;
}

/*
  超出省略号
*/

.ellipsis {
  display: inline-block;
  max-width: 130px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/*
  双行超出省略号，其他行数自定义 -webkit-line-clamp
*/
.ellipsis-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.ellipsis-1 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.break-all {
  word-break: break-all;
}

.pre-wrap {
  white-space: pre-wrap;
}

/*
  内容部分 自适应高度
*/
.main-calc-height {
  height: var(--app-main-height);
  box-sizing: border-box;
}

/*
  标题前带竖线样式
*/
.title-decoration-1 {
  position: relative;
  padding-left: 12px;
  &:before {
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 80%;
    content: '';
    background: var(--el-color-primary);
  }
}

/* tag */
.default-tag {
  background: var(--el-color-primary-light-8);
  color: var(--el-color-primary);
  border: none;
}
.danger-tag {
  background: var(--tag-danger-bg);
  color: #d03f3b;
  border: none;
}
.success-tag {
  background: var(--tag-success-bg);
  color: var(--el-color-success);
  border: none;
}
.warning-tag {
  background: var(--tag-warning-bg);
  color: var(--el-color-warning);
  border: none;
}

.info-tag {
  background: var(--app-text-color-light-1);
  color: var(--app-text-color-secondary);
  border: none;
}

.purple-tag {
  background: #f2ebfe;
  color: #7f3bf5;
  border-color: #e0d7f0;
}

.blue-tag {
  background: #ebf1ff;
  color: #3370ff;
  border-color: #d6e2ff;
}

/*
  card 无边框无阴影 灰色背景
*/
.card-never {
  background: var(--app-layout-bg-color);
  border: none;
}

/*
   图标旋转90度
*/
.rotate-90 {
  transform: rotateZ(90deg);
}
.rotate-180 {
  transform: rotateZ(180deg);
}
/*
  表格第一行插入自定义行
*/
.table-quick-append {
  background: #ffffff;
  .el-table__append-wrapper {
    position: absolute;
    top: 0;
    border-bottom: var(--el-table-border);
    width: 100%;
    height: 49px;
    box-sizing: border-box;
    align-items: center;
    display: flex;
    padding: 0 12px;
    background: #ffffff;
    cursor: pointer;
    z-index: 2;
    &:hover {
      background: var(--el-color-primary-light-9);
      z-index: 1;
    }
  }
  .el-table__body {
    margin-top: 49px;
  }
}

// checkbox-group 文字在左 input在右
.app-custom-checkbox-group {
  line-height: normal;
  .el-checkbox__label {
    display: none;
  }
}

/*
  头像渐变背景
*/
.avatar-gradient {
  background: var(--app-avatar-gradient-color);
}

.avatar-light {
  background: var(--el-color-primary-light-3);
}

.avatar-purple {
  background: #7f3bf5;
}
.avatar-blue {
  background: #3370ff;
}

.avatar-green {
  background: #34c724;
}
.avatar-grey {
  background: #bbbfc4;
}

.success {
  color: var(--el-color-success);
}
.danger {
  color: var(--el-color-danger);
}
.warning {
  color: var(--el-color-warning);
}
.primary {
  color: var(--el-color-primary);
}
.info {
  color: var(--el-color-info);
}

.color-secondary {
  color: var(--app-text-color-secondary);
}

.layout-bg {
  background: var(--app-layout-bg-color);
}

.white-bg {
  background: #ffffff;
}

.app-warning-icon {
  font-size: 16px;
  color: var(--app-text-color-secondary);
}

.dotting {
  display: inline-block;
  width: 10px;
  min-height: 2px;
  padding-right: 2px;
  margin-left: 2px;
  padding-left: 2px;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
  background-color: currentColor;
  background-clip: content-box;
  box-sizing: border-box;
  -webkit-animation: dot 0.8s infinite step-start both;
  animation: dot 0.8s infinite step-start both;
  &:before {
    content: '...';
  }
  &::before {
    content: '';
  }
}

@-webkit-keyframes dot {
  25% {
    border-color: transparent;
    background-color: transparent;
  }
  50% {
    border-right-color: transparent;
    background-color: transparent;
  }
  75% {
    border-right-color: transparent;
  }
}
@keyframes dot {
  25% {
    border-color: transparent;
    background-color: transparent;
  }
  50% {
    border-right-color: transparent;
    background-color: transparent;
  }
  75% {
    border-right-color: transparent;
  }
}

.file-List-card {
  border-radius: 4px;
  .el-card__body {
    padding: 8px 16px 8px 12px;
  }
}

.card__radio {
  width: 100%;
  display: block;
  line-height: 22px;
  .el-radio {
    white-space: break-spaces;
    width: 100%;
    height: 100%;
    line-height: 22px;
    color: var(--app-text-color);
  }

  :deep(.el-radio__label) {
    padding-left: 30px;
    width: 100%;
  }
  :deep(.el-radio__input) {
    position: absolute;
    top: 16px;
  }
  .active {
    border: 1px solid var(--el-color-primary);
  }
  .el-card__body {
    padding: calc(var(--app-base-px) + 4px) calc(var(--app-base-px) * 2);
  }
}

// 段落card
.paragraph-source-card {
  height: 210px;
  width: 100%;
  .active-button {
    position: absolute;
    right: 16px;
    top: 16px;
  }
}

// 分段 dialog
.paragraph-dialog {
  padding: 0 !important;
  .el-scrollbar {
    height: auto !important;
  }
  .el-dialog__header {
    padding: 16px 24px;
  }
  .el-dialog__body {
    border-top: 1px solid var(--el-border-color);
  }
  .el-dialog__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--el-border-color);
  }

  .title {
    color: var(--app-text-color);
  }
}

// card 选中样式
.selected {
  border: 1px solid var(--el-color-primary) !important;
  &:before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    border: 14px solid var(--el-color-primary);
    border-bottom-color: transparent;
    border-left-color: transparent;
  }

  &:after {
    content: '';
    width: 3px;
    height: 6px;
    position: absolute;
    right: 5px;
    top: 2px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-left-color: transparent;
    transform: rotate(35deg);
  }
  &:hover {
    border: 1px solid var(--el-color-primary);
  }
}

.app-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0px 2px 4px 0px rgba(31, 35, 41, 0.12);
}

.app-radio-button-group {
  border: 1px solid var(--app-border-color-dark);
  border-radius: var(--el-border-radius-base);
  .el-radio-button {
    padding: 3px;
  }
  .el-radio-button__inner {
    border: none !important;
    border-radius: var(--el-border-radius-base) !important;
    padding: 5px 8px;
    font-weight: 400;
  }
  .el-radio-button__original-radio:checked + .el-radio-button__inner {
    color: var(--el-color-primary) !important;
    background: var(--el-color-primary-light-9) !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 500;
  }
}

// 自定义主题
.custom-header {
  background: var(--el-color-primary-light-9) !important;
}

.edit-avatar {
  position: relative;
  .edit-mask {
    position: absolute;
    left: 0;
    background: rgba(0, 0, 0, 0.4);
  }
}

.record-tip-confirm {
  max-width: 800px !important;
}

//企业微信
.wwLogin_qrcode_head {
  padding: 20px 0 !important;
}

// 复合搜索框
.complex-search {
  border: 1px solid var(--el-border-color);
  border-radius: var(--el-border-radius-base);
  .el-select__wrapper {
    box-shadow: none !important;
  }
  .el-input__wrapper {
    box-shadow: none !important;
  }
  &__left {
    border-right: 1px solid var(--el-border-color);
  }
}

@media only screen and (max-width: 768px) {
  .responsive-dialog {
    width: 90% !important;
  }
}
